import Vue from 'vue'
import Router from 'vue-router'

import HelloWorld from '@/components/HelloWorld'
import Panel from '@/components/askingPanel/panel.vue'
import Main from '@/components/main/main.vue'
import Answer from '@/components/answer/answer'
import BackDoor from '@/components/backdoor/backdoor'
import List from '@/components/askingList/askingList'
import QuestionManage from  '@/components/askingmanage/askingmanage'
import SortManage from '@/components/sortmanage/sortmanage'
import NewAsking from '@/components/newAsking/newAsking'
import AskingFeedBack from '@/components/askingfeedback/feedback'
import HandleFeedBack from '@/components/handleFeedBack/handleFeedBack'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component:Main, 
    },
    { 
      path:'/singleQustion',
      name:'Question',
      component:Panel,
      children: [
        {
          path: ':id',
          component: Answer
        },
        {
          path:'',
          component:List
        }
      ]
    },
    {
      path:'/backdoor',
      component:BackDoor,
      children:[    
        {
          path:'sortManage',  //分类管理
          component:SortManage
        },    
        {
          path:'questionmanage',  //问题管理
          component:QuestionManage,
        },
        {
          path:'feedback',  //问题反馈
          component:AskingFeedBack,
        },       
        {
          path:'handleBack',  //反馈处理
          component:HandleFeedBack,
        },
        {
          path:'newQuestion', //新增问题
          component:NewAsking,
        },
        {
          path:'',
          component:SortManage
        }
      ]
    }
  ]
})
